FROM node:lts-alpine

# 指定执行的工作目录
WORKDIR /home/egg

COPY package.json /home/egg/package.json
COPY ./.npmrc /home/egg/.npmrc

RUN npm i

RUN cat /home/egg/package.json

# 复制打包产物到容器的/home目录
COPY . /home/egg

RUN npm run tsc

EXPOSE 8080


# CMD npm run dev -- --port 8080
CMD npm start